package com.cmc.cloud.cmclink.doc.vo.portspecialrequestvo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 接货地或目的地单证特殊要求配置 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 *
 * @author codegen
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class PortSpecialRequestBaseVO {

    @Schema(description = "港口类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotBlank(message = "港口类型不能为空")
    @Length(max = 5, message = "港口类型支持最大长度{max}")
    private String portType;

    @Schema(description = "港口代码", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "港口代码不能为空")
    @Length(max = 5, message = "港口代码支持最大长度{max}")
    private String portCode;

    @Schema(description = "要求代码", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "要求代码不能为空")
    @Length(max = 30, message = "要求代码支持最大长度{max}")
    private String requestCode;

    @Schema(description = "要求英文描述", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "要求英文描述不能为空")
    @Length(max = 100, message = "要求英文描述支持最大长度{max}")
    private String requestDescEn;

    @Schema(description = "要求中文描述", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "要求中文描述不能为空")
    @Length(max = 100, message = "要求中文描述支持最大长度{max}")
    private String requestDescCn;

    @Schema(description = "排序号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "排序号不能为空")
    private Long sortNo;

    @Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "随便")
    @NotBlank(message = "备注不能为空")
    @Length(max = 100, message = "备注支持最大长度{max}")
    private String remark;

    @Schema(description = "是否必填")
    private Boolean isRequested;

    @Schema(description = "是否打印在提单上")
    private Boolean isPrintOnBl;

}
